package com.cmcc.linlaker.ui.mine.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;
import android.widget.EditText;

import com.cmcc.linlaker.ui.mine.bean.BookTypeBean;

import java.util.List;

public class BookPageAdapter extends FragmentPagerAdapter {
    List<BookTypeBean.BookTypeListBean> list;
    List<Fragment> fragmentList;

    public BookPageAdapter(FragmentManager fm, List<BookTypeBean.BookTypeListBean> list, List<Fragment> fragmentList) {
        super(fm);
        this.list = list;
        this.fragmentList = fragmentList;
    }

    @Override
    public CharSequence getPageTitle(int position) {
        return list.get(position).name;
    }

    @Override
    public Fragment getItem(int position) {
        return fragmentList.get(position);
    }

    @Override
    public int getCount() {
        return list.size();
    }
}
